//
//  HMSalesManHeadView.m
//  优学荟管理系统
//
//  Created by 陈辉明 on 2017/11/11.
//  Copyright © 2017年 星道三好. All rights reserved.
//

#import "HMSalesManHeadView.h"

@interface HMSalesManHeadView ()


@property (weak, nonatomic) IBOutlet UILabel *royaltiesLabel;//业务总提成




@property (weak, nonatomic) IBOutlet UILabel *payEvaluateLabel;//缴费评价
@property (weak, nonatomic) IBOutlet UILabel *allEvaluateCountLabel;//缴费评价评价总次数
@property (weak, nonatomic) IBOutlet UILabel *allUseContLabel;//缴费评价有效评价总次数
@property (weak, nonatomic) IBOutlet UILabel *seeAllTimeLabel;//缴费评价查看总次数
@property (weak, nonatomic) IBOutlet UILabel *wuPayEvaluateLabel;//暂无缴费有评价
@property (weak, nonatomic) IBOutlet UILabel *wuAllUseContLabel;//暂无缴费评价总次数
@property (weak, nonatomic) IBOutlet UILabel *wuSeeTimeLabel;//暂无缴费有效评价总次数
@property (weak, nonatomic) IBOutlet UILabel *noSeeRmbLabel;


@end

@implementation HMSalesManHeadView
//"totalSettleMoneyPay": 0,
//"totalSettleMoneyNotPay": 0,
//"threeCommentCountPay": 179,
//"threeCommentCountNotPay": 0,
//"validThreeCommentCountPay": 2,
//"validThreeCommentCountNotPay": 0,
//"totalViewCountPay": 2,
//"totalViewCountNotPay": 0



- (void)setDictAry:(NSDictionary *)dictAry{
    
    _dictAry = dictAry;
    
    
    double meoney = [[dictAry valueForKey:@"totalSettleMoneyPay"] doubleValue];
    double moneyTow = [[dictAry valueForKey:@"totalSettleMoneyNotPay"] doubleValue];
    
    NSString *str = [NSString stringWithFormat:@"%.2f",(meoney + moneyTow)];
    
    self.royaltiesLabel.text = [NSString stringWithFormat:@"¥%@",str];
    
    
    
    self.payEvaluateLabel.text = [NSString stringWithFormat:@"%@元",[dictAry valueForKey:@"totalSettleMoneyPay"]];//缴费评价
    
    
    self.allEvaluateCountLabel.text = [NSString stringWithFormat:@"评价总次数:%@次",[dictAry valueForKey:@"threeCommentCountPay"]];//缴费评价总次数
    self.allUseContLabel.text = [NSString stringWithFormat:@"有效评价总次数:%@次",[dictAry valueForKey:@"validThreeCommentCountPay"]];//有效评价总次数
    
    self.seeAllTimeLabel.text =[NSString stringWithFormat:@"查看总次数:%@次",[dictAry valueForKey:@"totalViewCountPay"]];//查看总次数
    
    
    self.noSeeRmbLabel.text = [NSString stringWithFormat:@"%@元",[dictAry valueForKey:@"totalSettleMoneyNotPay"]];
   
    
    self.wuPayEvaluateLabel.text = [NSString stringWithFormat:@"评价总次数:%@次",[dictAry valueForKey:@"threeCommentCountNotPay"]];
    
    self.wuAllUseContLabel.text = [NSString stringWithFormat:@"有效评价总次数:%@次",[dictAry valueForKey:@"validThreeCommentCountNotPay"]];
    
    
    
    self.wuSeeTimeLabel.text = [NSString stringWithFormat:@"查看总次数:%@次",[dictAry valueForKey:@"totalViewCountNotPay"]];
}






#pragma mark - Action


- (IBAction)clickSureButton:(id)sender {
    
    if (self.sureBlock) {
        self.sureBlock();
    }
    
}

@end
